import requests
import json

headers = {
    "accept": "application/json, text/plain, */*",
    "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    "cache-control": "no-cache",
    "e83401f58944ba17eb16": "5a558cac4696d5bfa7373d06028c17bd5e50a2916ed7d77b0099338db7355aa9b6364844a020b2ceb4e11888561453496665f980f741177dafae0adbc06771d8",
    "pragma": "no-cache",
    "priority": "u=1, i",
    "referer": "https://www.qcc.com/",
    "sec-ch-ua": "\"Not A(Brand\";v=\"8\", \"Chromium\";v=\"132\", \"Microsoft Edge\";v=\"132\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0",
    "x-pid": "40148ee30c74c8aa329672679219702b",
    "x-requested-with": "XMLHttpRequest"
}
cookies = {
    "acw_tc": "0a472f8117391874466507492e00e2c1000c959ec9141d66d8cd60ff3d61f5",
    "QCCSESSID": "991c31d3c81466994caada0513",
    "qcc_did": "e0021f18-50a9-43b2-af46-96b2acaa9ea5",
    "UM_distinctid": "194efa67bd01cfe-03f2b0c72cad62-4c657b58-146d15-194efa67bd12bc4",
    "CNZZDATA1254842228": "861314818-1739187453-https%253A%252F%252Fwww.qcc.com%252F%7C1739188304",
    "tfstk": "go-xglN_5bc0ncsnmmglIKHhTQDoxhpqnIJQj1f05QdJNdTcSqSiXUpM_nbsgix9wBRTjx-9QlB6CCkVsxuk3KSNfXchXDv231urVKGlfA95jOFybtCy3KSaU8Vs-U946jVjdds61g_5B9s1h1ajeu6cNo6_cONSeO55fOs15095I9q_1ZO6FYBNNt6X1GM9pmfa46q9Jfm5Ely5qlZ62tQSrK15oZkGHZekH_EsOHXxf69fwlZ1iVwtoLpmMkJl0HAdKIm7DBp6LF_JX7Gd_3pWcF9zMf6y5Ij5iMgbeix2he_6Afz69idORn_8Ck92h_SRFHMg8_xRiCtAPvqdSgthRiTozjbGD9d60IeTfB9kKn7yXXF5_EXFVOKZdPCO5gWexHen7WfdIrM-ePzNlTohn3_Xg1_iiTCnE_Ua7anfe6D-ePzNlTWRtYf87P7-c"
}
url = "https://www.qcc.com/api/home/getNewsFlash"
params = {
    "firstRankIndex": "",
    "lastRankIndex": "1739179767923",
    "lastRankTime": "1739179767923",
    "pageSize": "1"
}
response = requests.get(url, headers=headers, cookies=cookies, params=params)
title= response.json()[0]["feed_data"]["links"][0]["title"]
content=response.json()[0]["feed_data"]["content"]
print(title,content)
print(response)